<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateImagesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
    public function up()
    {
        //图片表
        Schema::create('images', function(Blueprint $table)
        {
            $table->increments('id') ;                  //图片的标识
            $table->unsignedInteger('file_id');         //文件标识
            $table->string('img_name') ;                //图片名
            $table->string('img_type');                 //图片类型
            $table->softDeletes();
            $table->timestamps();
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schama::drop('images') ;
    }

}
